package org.tabletopmachine.match.unit;

import java.util.EnumSet;

import org.tabletopmachine.match.SpecialRules;

public enum Weapon {
	Bow("Bow", 24, 3, 0, EnumSet.of(SpecialRules.VolleyFire)), CrossBow("Cross Bow", 30, 4, 0, EnumSet.of(SpecialRules.MoveOrFire)), GreatWeapon(
			"Great Weapon", 0, 0, 2, EnumSet.of(SpecialRules.RequiresTwoHands, SpecialRules.AlwaysStrikesLast)), Halberd("Halberd", 0, 0, 1, EnumSet
			.of(SpecialRules.RequiresTwoHands)), HandGun("Hand Gun", 24, 3, 0, EnumSet.of(SpecialRules.VolleyFire)), Javelin("Javelin", 12, 0, 0, EnumSet
			.of(SpecialRules.QuickToFire)), Lance("Lance", 12, 0, 0, EnumSet.of(SpecialRules.None)), None("None", 0, 0, 0, EnumSet.of(SpecialRules.None));

	private final String _name;
	private final int _range;
	private final int _strength;
	private final int _strengthBonus;
	private final EnumSet<SpecialRules> _specialRules;

	private Weapon(String name, int range, int strength, int strengthBonus, EnumSet<SpecialRules> rules) {
		_name = name;
		_range = range;
		_strength = strength;
		_strengthBonus = strengthBonus;
		_specialRules = rules;
	}

	public int getRange() {
		return _range;
	}

	public int getStrength() {
		return _strength;
	}

	public int getStrengthBonus() {
		return _strengthBonus;
	}

	public String getName() {
		return _name;
	}

	public EnumSet<SpecialRules> getSpecialRules() {
		return _specialRules;
	}

	public String toString() {
		return _name;
	}
	// public final static Weapon Bow = new Weapon("Bow", 24, 3, 0,
	// EnumSet.of(SpecialRules.VolleyFire));
	// public final static Weapon CrossBow = new Weapon("Cross Bow", 30, 4, 0,
	// EnumSet.of(SpecialRules.MoveOrFire));
	// public final static Weapon GreatWeapon = new Weapon("Great Weapon", 0, 0,
	// 2, EnumSet.of(SpecialRules.RequiresTwoHands,
	// SpecialRules.AlwaysStrikesLast));
	// public final static Weapon Halberd = new Weapon("Halberd", 0, 0, 1,
	// EnumSet.of(SpecialRules.RequiresTwoHands));
	// public final static Weapon HandGun = new Weapon("Hand Gun", 24, 3, 0,
	// EnumSet.of(SpecialRules.VolleyFire));
	// public final static Weapon Javelin = new Weapon("Javelin", 12, 0, 0,
	// EnumSet.of(SpecialRules.QuickToFire));
	// public final static Weapon Lance = new Weapon("Lance", 12, 0, 0,
	// EnumSet.of(SpecialRules.None));
}
